package weekMatch.two_102;

public class T4Test {
    public static void main(String[] args) {
        Graph g = new Graph(4, new int[][]{{0,2,5},{0,1,2},{1,2,1},{3,0,3}});
        System.out.println(g.shortestPath(3, 2));
        System.out.println(g.shortestPath(0, 3));
        g.addEdge(new int[]{1,3,4}); // 添加一条节点 1 到节点 3 的边，得到第二幅图。
        System.out.println(g.shortestPath(0, 3));
        System.out.println(g.shortestPath(3, 1));
    }
}
